import CrudTable from './CrudTable.vue'
import { _request } from '../utils.js'
import { _keys } from '../token'


export default {
  install(app, { requestMethod = _request, requestKeys = {} } = {}) {
    const $_requestKeys = Object.assign(_keys, requestKeys)
    app.mixin({
      data() {
        return {
          $_requestKeys,
        }
      },
      methods: {
        $_request: requestMethod
      },
    })
    app.component('CrudTableV2', CrudTable)
  }
}